1. Field of the Invention
The present invention generally relates to a method and an image processing device. In particular, the present invention relates to a method and an image processing device for image dynamic range compression with local contrast enhancement.
2. Description of Related Art
A pixel is a basic unit of composition of an image, and each image includes a plurality of different colors of pixels. The term “dynamic range” is defined as the ratio of the highest to the lowest detectable pixel value of an image. A so-called high dynamic range scene refers to as a scene with a high variation between the extreme of lightness and darkness such as sunrises, sunsets, fireworks, and so forth.
The human senses of sight have a very high dynamic range. A sight adaptation enables the human eye to easily adapt to changes in light levels and distinguish between a higher range of variation. The dynamic range of the human eye is higher than a conventional image capturing device. In terms of photo shooting, when the ambient light is not evenly distributed, the captured image may result in overexposure in bright areas and underexposure in dark areas due to an insufficient dynamic range of the camera. Therefore, when the dynamic range of the image is higher, the image reveals more detail and information of the original scene. In other words, the image is much closer to the original scene in human visions.
A scene with a high dynamic range may be reproduced on displays by color reproduction and dynamic range compression. The dynamic range compression may reduce the dynamic range of an image on the premise of preserving detail and information in bright and dark regions. In related algorithms, an area with high contrast may be first detected from the image, and the dynamic range thereof may be compressed so as to reduce the dynamic range of the whole image. Accordingly, detail of dark regions of the image may be enhanced while detail of bright regions may be preserved. The Adaptive and Integrated Neighborhood-dependent Approach for Non-linear Enhancement (AINDANE) algorithm is a well-known method in color image enhancement and involves two separate processes: adaptive luminance enhancement and adaptive contrast enhancement, wherein the former process compresses dynamic range of an input image, and the latter process restores local contrast after range compression. However, the AINDANE algorithm only processes the luminance component of the input image; that is, it requires combining with a linear color restoration process to deal with color image enhancement. Although this algorithm performs well in color image enhancement, the image enhancement procedure usually requires high computational costs with a large memory, leading to an inefficient algorithm. Besides, the AINDANE algorithm may lead to a large color mapping ratio for a dark pixel and thus over-enhance dark regions of the image.
Accordingly, an adaptive dynamic range compression format with a local contrast enhancement algorithm is proposed in the present invention so as to improve visual quality of color images and further achieve real-time performance in processing high-definition video streams in limited computation costs.